package com.dailyblue.java.standard.thread.safe;

public class SafeB implements Runnable {

    private SafeA sa;

    public SafeB(SafeA sa) {
        this.sa = sa;
    }

    public void run() {
        // 自增了100次
        for (int i = 0; i < 10; i++) {
            sa.add2();
        }
    }
}
